<template>
	<view class="page">
		<OrgServe v-if="userInfo.userType == enums['账号类型']['机构']" ref="orgServeRef"></OrgServe>
		<UserServe v-if="userInfo.userType == enums['账号类型']['用户']" ref="userRef"></UserServe>
	</view>
</template>

<script>
import OrgServe from './orgServe.vue';
import UserServe from './userServe.vue';
export default {
	components: {
		UserServe,
		OrgServe
	},
	data() {
		return {
			userInfo: this.$store.getters.getUserInfo,
			enums: this.$enums
		};
	},
	onShow() {
		console.log(this.userInfo)
		this.userInfo=uni.getStorageSync('open')
		console.log(this.userInfo)
		this.getOrgOrderList();
		this.$refs.userRef.getTypeAllList()
		this.$refs.userRef.dataList=[]
	},
	methods: {
		getOrgOrderList(){
			setTimeout(()=>{
				if(this.userInfo.userType == this.enums['账号类型']['机构']) {
					this.$refs.orgServeRef.search();
				}
			},100)
		}
	},
	onLoad() {}
};
</script>

<style lang="stylus" scoped>

</style>
